<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.5.21/dist/vue.min.js"></script>
</head>
<body>
<h1>绑定事件</h1>
<div id="event">
    <button v-on:click="hello">点我</button>
</div>

<script>
    var vm=new Vue({
        el:"#event",
        data: {
            message: "Hello World!"
        },
        methods:{
            hello:function (event) {
                alert(this.message)
            }
        }
    });
</script>
</body>
</html>